package project.Mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import project.Pojo.Doctor;

import java.util.List;


@Mapper
public interface DoctorMapper {
    @Select("select  username, password, name, sex, age, experience from doctor")
    List<Doctor> SelectAll();

    @Select("select  password, name, sex, age, experience from doctor where username = #{username}")
    List<Doctor> SelectByUsername(String username);

    @Insert("INSERT INTO doctor(username,password) values (#{username},#{password})")
    void InsertAll(String username, String password);

    @Update("update doctor set password = #{password} where username = #{username}")
    void UpdatePassword(String username, String password);

}
